package com.cplatform.cat.java8;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

import static java.util.Comparator.*;

public class LambdaCombat {
    public static void main(String[] args) {
        List<Apple> inventory = Arrays.asList(new Apple(80,"green"),
                new Apple(155, "green"),
                new Apple(120, "red"));
        inventory.sort(comparing((Apple::getWeight)));
    }
}
